import request from "../utils/request";

export const getRoleName=(param)=>{
    return request({
        url:"role/getRoleNamekById",
        method:"get",
        params:{"userId":param}
    })
}
export const getRoles=()=>{
    return request({
        url:"role/getRoles",
        method:'get'
    })
}

export const editRole=(param)=>{
    return request({
        url:"role/editRole",
        method:'post',
        data:param
    })
}

export const addRole=(param)=>{
    return request({
        url:"role/addRole",
        method:'post',
        data:param
    })
}
export const selectRoleName=()=>{
    return request({
        url:"role/selectRoleName",
        method:'get',
    })
}
export const deleteRole=(param)=>{
    return request({
        url:"role/deleteRole",
        method:'get',
        params:{"roleId":param}
    })
}

